Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Zulu bundle flags #86

Merged
merged 3 commits into from
Jul 29, 2022
Merged

Conversation

j-baker
Copy link
Contributor

@j-baker j-baker commented Jul 29, 2022

Some Zulu distributions come with extra flags. I care about EA builds,
but there are other flags, which currently fail the string.split test.

This PR attempts to handle these flags on the Zulu part of the version
string. The Java version string can also contain -ea, but I assume the
'rest' of the string is the Java version string.

Before this PR

JDK version 19.0.21-ea-19.0.0-ea.6 fails.

After this PR

JDK version 19.0.21-ea-19.0.0-ea.6 passes.

Possible downsides?

This PR assumes that the rest of the string is the java version. So e.g. '19.0.21-ea-THIS!IS-NOT!A!VERSION!' would pass. This is similar behaviour to as present since the non-sensical openjdk version could just as easily be '19.0.21-ea-THIS!IS!NOT!A!VERSION' which would have passed prior to this PR.

Some Zulu distributions come with extra flags. I care about EA builds,
but there are other flags, which currently fail the string.split test.

This PR attempts to handle these flags on the Zulu part of the version
string. The Java version string can also contain -ea, but I assume the
'rest' of the string is the Java version string.
@changelog-app
Copy link

changelog-app bot commented Jul 29, 2022

Generate changelog in changelog/@unreleased

Type
See change types. Select one:

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Support Zulu bundle flags

Check the box to generate changelog(s)

  • Generate changelog entry

import org.immutables.value.Value;

final class AzulZuluJdkDistribution implements JdkDistribution {
// See https://docs.azul.com/core/zulu-openjdk/versioning-and-naming for flag details.
private static final ImmutableSet<String> BUNDLE_FLAGS =
ImmutableSet.of("ea", "embvm", "cp1", "cp2", "cp3", "c2", "criu", "cr", "crac");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a criu version of the JDK?? Interesting....

Copy link
Contributor Author

@j-baker j-baker Jul 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth saying: some of these flags are discontinued! (embvm is one). One only works for 32-bit ARM. The docs are very clear that just because a flag exists doesn't necessarily mean you can acquire a JVM with it set!

@bulldozer-bot bulldozer-bot bot merged commit 32f86ff into develop Jul 29, 2022
@bulldozer-bot bulldozer-bot bot deleted the jbaker/support_zulu_bundles branch July 29, 2022 10:10
@svc-autorelease
Copy link
Collaborator

Released 0.23.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants